#include "shm.hpp"
#include "NamePipe.hpp"

int main()
{
    //1.创建出共享内存
    Shm shm(gpathname, gproj_id, Creater);
    char *shmaddr = (char *)shm.Addr();

    //2.创建管道
    namedpipe pipe(fifo_path, Creater);
    pipe.OpenForRead();
    while (true)
    {
        std::string temp;
        pipe.ReadNamedPipe(&temp);
        std::cout << "Client Say:" << shmaddr << std::endl;
    }
    return 0;
}